<?php

class ToolbaseSitenotice {
       
        protected static $status_content = null;
        protected static $set = false;
       
        protected static function set( $filename = '/var/www/sitenotice' ) {
               
                if( self::$set ) return;
               
                self::$status_content = file_get_contents( $filename );
               
                self::$set = true;
               
        }
       
        public static function html( $filename = '/var/www/sitenotice' ) {
               
                self::set( $filename );
               
                if ( self::$status_content ) {
                            return htmlspecialchars( self::$status_content, ENT_QUOTES, sfConfig::get('sf_charset') );
                }
               
                return null;
        }
       
        public static function raw( $filename = '/var/www/sitenotice' ) {
               
                self::set( $filename );
               
                return self::$status_content;
               
               
        }
}

